/**
*      author: Y_Yao
*      created: 2025-02-01 12:16:40
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
const int N = 13;
int a[N],b[N];
int n;
unordered_set<int> s;
void dfs(int k,int cnt)
{
    if(k > n)
    {
        int res = 0;
        for(int i = 1;i <= cnt;i++)
        {
            res ^= b[i];
        }
        s.insert(res);
        return;
    }

    b[cnt + 1] = a[k];
    dfs(k + 1,cnt + 1);
    for(int i = 1;i <= cnt;i++)
    {
        b[i] += a[k];
        dfs(k + 1,cnt);
        b[i] -= a[k];
    }
}

void solve()
{
    cin >> n;
    for(int i = 1;i <= n;i++)
    {
        cin >> a[i];
    }

    dfs(1,1);
    cout << s.size() << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}